//
//  TYEmptyBaseView.m
//  TYUIKit
//
//  Created by TuyaInc on 2019/5/22.
//

#import "TYEmptyBaseView.h"

#import "TYEmptyBaseView+Internal.h"

@implementation TYEmptyBaseView

//- (void)ty_emptyViewDidAddToSuperView;
//- (void)ty_emptyViewShouldLayout;
//- (void)ty_emptyViewWillShow;
//- (void)ty_emptyViewDidShow;
//- (void)ty_emptyViewWillHide;
//- (void)ty_emptyViewDidHide;

- (void)ty_emptyViewShowAnimation:(void (^)(BOOL))completion {
    self.alpha = 0;
    self.hidden = NO;
    [UIView animateWithDuration:0.3 animations:^{
        self.alpha = 1;
    } completion:^(BOOL finished) {
        self.hidden = NO;
        if (completion) {
            completion(finished);
        }
    }];
}
- (void)ty_emptyViewHideAnimation:(void (^)(BOOL))completion {
    self.alpha = 1;
    [UIView animateWithDuration:0.3 animations:^{
        self.alpha = 0;
    } completion:^(BOOL finished) {
        self.hidden = YES;
        if (completion) {
            completion(finished);
        }
    }];
}


@end
